home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1997 February
/
EnigmA AMIGA RUN 15 (1997)(G.R. Edizioni)(IT)[!][issue 1997-02][PLANET CD V].iso
/
enigma
/
earcd
/
sviluppo
/
svilupp2
/
istar.lha
/
Docs
/
Driving Istar
< prev
next >
Wrap
Text File
|
1996-11-06
|
15KB
|
334 lines
DRIVING ISTAR
WHAT DO I NEED TO START IT?
Normally you don't need to bother about this lot as they are set up during
installation and Amiga startup. But if something goes wrong then this list
might help.
# assign KBTools: to some directory for best effect
# iff.library
# asl.library is needed for saving etc. (supplied with Amiga 1200)
# CGTimes Font
# Topaz 11 Font
# Topaz 8 Font (supplied with any Amiga)
HOW DO I START IT?
This describes the normal start of Istar, from WorkBench.
(If you are operating with low memory, such as a base A1200, then refer to
the section below on 'Starting with Low Memory'. If you start from CLI, a
few options are available in Version 1.04 onwards; see later.)
1. Double click on the Istar icon.
2. You will be presented with a grey Control Screen part way up the view.
Initially this has 'Istar' on its title bar but that is soon obscured by a
horizontal strip and, at the left, the Initial Control Panel.
3. Click the 'New' button, and two things will happen. First another
screen, a large blank white one appears. This is the Easel on which you
draw your KB (knowledge base). And, on the Control Screen, another panel
appears with columns of buttons and two list gadgets. (If you are
operating with limited memory, the standard Easel size (30 by 24 inches)
might be too large, and you will have to alter the Prefs before clicking
the New button.)
Here are a few instructions to get you started ...
4. Draw a box by pressing Left Mouse Button (LMB) over Easel, a box
appears, move mouse around to place it, then release LMB. (Do not click
it; clicking does something else.)
5. Draw another box, to the right of first one.
6. Press LMB over the right hand edge of the left-hand box, and you will
see a short line appear from your mouse pointer to a point one quarter the
way into the box. This line follows the mouse as you move it. Move until
line is over the right-hand box and release. If you want to insert a bend
in your line, hit Space bar when end of line is where you want the bend.
The left-hand box is called the antecedent of the right, and the right is
the consequent of the left.
7. (To escape from any operation you have started but don't want, hit the
Escape key. Then release the mouse button.)
That's the basic mechanism, and the whole knowledge base can be drawn like
that. Not too bad, is it?
GOING FURTHER
8. Various modifications of the diagram are possible:
a) Move a box by pressing LMB over the centre of the box. Dotted
skeleton of the box and all its connecting links appears. Move mouse
and this lot follows. Release in new position. (Note that boxes can
overlap, though it is usually not wise to do so; overlapping is
usually reserved to collections of boxes that are closely related
semantically.)
b) Bend a drawn link by pressing LMB over a link. Dotted bent line
follows mouse to new position; release. Pressing LMB over existing
bend will just move the bend to new position.
c) To redirect a link to another box, delete a box, delete a link,
delete a bend from a link: see below.
9. Entering detail, e.g. Name and Meaning. Click the Right Mouse Button
(RMB) over centre of box. (If you get a dotted box outline as in 7(a) then
you haven't clicked fast enough; hit escape key, release MB and try again.
You'll soon get the hang of it.) Up comes the Control Screen, showing an
Attribute Detail panel with around fifty gadgets. Don't panic: you need
only the top two: Label and Meaning; ignore the others for now. These are
string gadgets which allow you to enter a name for the box and a longer
meaning if you wish. For now, put something in both boxes - anything in
that you like. Then click the OK button. The Control Screen returns and
your box should display the new name.
10. Showing Meaning. Move the mouse over the box (do not press any mouse
button). The Meaning text should appear in the horizontal window in the
top of the Control Screen. Move mouse away, and it disappears. In this
way, even when the box label text is too small to read you can easily see
what a box means.
11. More antecedents. Draw another couple of boxes (see 3 above) near the
left-hand box (above or below it) and link these to the right-hand box as
in 5 above, so that it now has three or more antecedents. Best also to
name them with different names as in 8 above.
12. Running the KB. Now click with the Left Mouse Button over the centre
of the right-hand box. Up comes a small panel at the top of the Control
Screen containing a few buttons, the Attribute Action panel. The two
buttons on the left are: Reset and Infer, which allow you to run the KB.
Hit Reset, then hit Infer. Up comes a User Question panel, with text at
the top ("No text for xxxx"; we can change that, below), a large central
Value gadget and an large OK gadget to right, with a few others. Enter a
Value and press OK. Then a similar panel should appear for the next
attribute. And the next. If you have three left-hand boxes feeding into
the right-hand one you should get three such User Question panels.
13. Seeing the result. When the question sequence has finished, the
Attribute Action panel is still there. Hit the Data button, and you are
taken to the Attribute Details panel. The result should be shown on the
second row in the middle - and it should be the sum of all the values you
entered during the question sequence.
14. Selecting the inference method. The inference method is the way the
values found in the antecedent are combined to give a value to the
consequent. The default for an integer consequent is addition. But this
can be changed. On the Attribute Details panel there are three radio
buttons on the left hand side, with the middle selected: 'Inference'. To
its right is a small button with the name of the inference method, 'X = A +
B + C ..", indicating addition. Hit the button and a list of different
inference methods is presented. Choose one - say multiplication - and hit
its OK button.
15. Now hit the OK-Act button; this is similar to OK, but takes you to the
Attribute Action panel directly, having stored the new inference method in
the attribute. As in 10, hit Reset then Infer to get the sequence of
questions. Their values remain, so you need only hit OK for each. Hit
'Data..' to see the new value, which should be the product of your values.
16. Suppressing irrelevant information. Note that Istar only asks
questions that it needs to, and thus avoids asking irrelevant ones. With
multiplication this happens if one of the antecedents is zero - we then
know the consequent will be zero, whatever values the remaining antecedents
take, so there is no point asking them. Try it. (If you forget how, go to
the Attribute Action panel of the consequent, hit Reset and Infer. Then
put the second User Question value to 0 and hit OK. The third should not
be asked.)
17. Control Screen. Whenever you want to access the Control Screen, click
the Gadget showing two arrows at top left of the Control Screen. Up it
comes. Click it again, and it parks back down the bottom. Alternatively,
you can drag the Control Screen up and down manually using the two-pixel
strip at the top of the Screen above the Meaning Strip. (Advanced use:
You can change the parking position, e.g. to be lower and reveal more of
the Easel. To do this, drag the Control Screen to where you want its
parking position to be and then click the wee gadget immediately to the
right of the up-and-down one. This records a new parking position.)
18. Different item types. Bring up the control screen. Top right window
should show list of item types. Select Proportion, send Control Screen
back down again, and draw box; should say 'Proportion'. Once you have
several types of box in your Easel a quick way of changing type is to move
mouse over a box of the type you want and hit 'T' key (for 'Type'). Try it
over one of the original (Integer) boxes and note how the Item Type
Selection changes to Integer. Draw, and you'll get an integer.
19. Automatic Type Conversion. Now link from right hand side of the
Proportion box to one of the original (Integer) boxes. When the link is
operative (see below) there will be an automatic conversion from Proportion
to Integer (usually as a percentage 0 to 100).
WHAT MORE IS THERE?
20. Lots more. That should more than get you started. But there's lots
more:
# Larger inference nets
# Multi-step
# Loop prevention
# Scrolling
# Zooming
# Showing parts
# Goal lists
# Topics
# Find
# Forms
# Creating new item types, multiple attributes
# Creating new attribute types
# Document creation
# KB Dump, save, load.
** IF YOU WISH, YOU CAN NOW GO STRAIGHT TO <USING ISTAR>.
STARTING FROM CLI
To start Istar from CLI, simply type "Istar", maybe appending the version
number if there is one. (I assume that you are familiar with paths etc. or
how to activate a program in another directory.)
Advanced use:
From CLI you can start with various tracing on, by adding the
parameters:
"-tm" to trace some activity in the modules mechanism
"-tu" to trace some UA module activity
"-te" to trace some activity among easels
so the command might be:
Istar1.04 -tu -te
This will usually only be of value when you suspect some bug and want to
send me a trace of what happens.
STARTING WITH LOW MEMORY
The standard startup will just about start in a base 2 Mb A1200 as long as
your Workbench screen is simple PAL 640 by 256 and only 4 colours. But in
other situations, from Version 1.04 onwards, you can take action to reduce
the amount of memory needed for your KB, before you create it. There are
two ways of doing this.
LOW MEMORY METHOD 1:
This method involves starting up and immediately altering some of the
preferences via the Prefs panel.
# As soon as the Initial Control Panel comes up, click on the Prefs
button to bring up the Preferences panel.
# Alter the MinDSA figure (usually 50000 longwords) to e.g. 10000;
this reduces the size of a new KB from around 20000 bytes to around
40000.
# Alter the size of the Easel from 1920 by 768 to something smaller,
such as 640 by 256. If its Depth is shown as 4 or higher reduce it
to 3. Doing these reduces the amount of memory for the Easel of a
new KB. The original size easel consumes around 200 kbytes for each
bitplane, whereas 640 by 256 consumes only around 20 kbytes per
bitplane.
Note, though, that you should only do this if you can work with a small KB
or easel. Also, doing this will not alter the sizes of KB or easel that
are loaded from file.
LOW MEMORY METHOD 2:
Altering the preferences each time you load up can be tedious. So Istar
can also load preferences from a file as it enters, which in version 1.04
is the file IstarSys:IstarPrefs (that is, IstarPrefs in the drawer to which
IstarSys: is assigned). So all you need to do is supply such a file,
according to your needs.
A file, IstarPrefs_LowMem is already supplied, so you need only enter
the following command from a CLI:
COPY IstarSys:IstarPrefs_LowMem IstarSys:IstarPrefs
Bring up the Prefs panel to see the sizes it has given you. If you wish
anything different then make up your own IstarPrefs file. There are many
other Preferences that can be set via this file. See 'Preferences' section
in the 'KBs' chapter for details.
WHAT IS AN ITEM?
An item in Istar is some focus of attention in the knowledge base. It is
represented on the Easel by a box or group of boxes that move together. An
item can have:
# any number of attributes (so far they have had only 1)
# relationships to other items
On the Item Type list on the KB panel, select 'Contract Meaning'. This is
an item expressed by two boxes, when you draw it on the Easel. The top one
represents the item itself, the bottom one an attribute of the item.
You can define your own item types. Let's try doing so. Hit the
'New' button below the Item Type list. A new panel, Create New Item Type
(CNIT) comes up for an item type called 'Unnamed'. Change the name to
'Employee'.
Now we will add attributes to the item type. To add each attribute
to an item type we do three things:
1. Set the type
2. Set the name
3. Click the addition button just above the Type.
So first, hit the Type wee button, and select String from the list that
comes up; hit its OK button. Then in the Attribute name to the left of the
Type, enter 'Name'. Now hit the button above Type. 'Name' will appear in
the list in the middle of the panel. Now create an attribute called 'Age',
of type Integer using the same steps. Now create an attribute called 'Day
off' of Type 'Weekdays'. Lastly, create an attribute called 'Salary' of
Type Integer.
Then press OK (called Done in some versions) on the CNIT panel, and
it disappears. Look at the SIT panel and you will see 'Employee' has been
added at the bottom and should be selected (if not, select it).
Now draw on the Easel and you should get a tall box group with five
boxes: a smaller one at the top representing the employee itself, with four
attribute boxes: Name, Age, Day off, Salary.
Notice the similarity to databases: item = entity or record,
attribute = attribute or field. Unlike many databases new item types can
be created at any time. And (probably not this version) new attributes can
be added to existing item types.
WHAT IS AN ATTRIBUTE?
An attribute is a holder of a value - such as Name, Age, etc. It can be of
two types: in an item or a free attribute. Each attribute is expressed by
a box. When you started above, you were drawing (creating) free
attributes. When you drew the Employee box group you created an item with
for attributes. Free attributes actually belong to a hidden item, for
which there is no visible box.
Attributes can be of a variety of types, which normally are defined
in terms of value types (see below).
It became clear during the INCA research project that the
conventional picture, of items with several attributes, was not always
appropriate. In an inference net a lot of items exist merely to support a
single attribute, and so Istar developed the idea of 'free attributes', in
which the item is still there for structural purposes but is de-emphasized
and not shown on the easel. So in the Select Item Type panel the first set
of items is normally a load of free attributes. They are represented by
single boxes. Whether they are called attributes or items is immaterial.
Copyright (c) Andrew Basden, 1996